<%-- 
    Document   : class-of-student-action
    Created on : Feb 26, 2012, 8:03:21 PM
    Author     : PhucAn
--%>

<%@page import="util.PagingUtil"%>
<%@page import="util.SharingUtil"%>
<%@page import="dto.User"%>
<%@page import="java.util.ArrayList"%>
<%@page import="dao.ClassDAO"%>
<%
    ClassDAO daoClass = new ClassDAO();   
    ArrayList<dto.Class> list;  
    list = daoClass.getClassesOfStudent(SharingUtil.getUser(session));
    request.setAttribute("list", list);
    String selectedId=request.getParameter("classid");
    if ( selectedId!= null) {
        int id = Integer.parseInt(selectedId);
        SharingUtil.setCurrentClass(session, daoClass.getClass(id));
        response.sendRedirect("index.jsp");
    }
%>
